﻿@using BlazorFluentUI.Models;
@namespace BlazorFluentUI
@inherits FluentUIComponentBase

<div @ref="RootElementReference" style="display: inline">
    <OverflowSet Items=@((List<IRibbonItem>)items) OverflowItems=@((List<IRibbonItem>)overflowItems) GetKey=@(x => $"k_{ Guid.NewGuid().ToString().Replace("-", "")}") Style="display: inline-block;vertical-align: top">
        <ItemTemplate>
                @ItemTemplate!(context)
        </ItemTemplate>
        <OverflowTemplate>
            <CommandBarButton SubordinateItemTemplate=@true HideChevron="true" Style="min-width: 0; padding: 0 4px; align-self: stretch;" IconName="more_horizontal" MenuItems=@(ItemTransform!(context))>
                <MenuItemTemplate Context="overflowItem">
                    @ItemTemplate!((IRibbonItem)overflowItem)
                </MenuItemTemplate>
            </CommandBarButton>
        </OverflowTemplate>
    </OverflowSet>
    @if (ShowDelimiter)
    {
    <div style="display: inline-block; border-left: 1.5px solid lightgrey; height: 32px; margin-top:4px;"></div>
    }
</div>
